﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 班级系统
{
    public partial class Conclud : Form
    {
        Student thou = new Student();
        public Conclud(Student thou)
        {
            InitializeComponent();
            this.thou = thou;
        }

        private void Conclud_Load(object sender, EventArgs e)
        {
            //List<string> name = new List<string>();
            //if (thou.checkB1.Text != "1" && thou.ischecked[0] == 1)
            //{
            //    name.Add(thou.checkB1.Text);
            //}
            //if (thou.checkB2.Text!="1"&&thou.ischecked[1]==1)
            //{
            //  name.Add(thou.checkB2.Text);  
            //}
            //if (thou.checkB3.Text != "1" && thou.ischecked[2] == 1)
            //{
            //    name.Add(thou.checkB3.Text);
            //}
            //if (thou.checkB4.Text != "1" && thou.ischecked[3] == 1)
            //{
            //    name.Add(thou.checkB4.Text);
            //}
            
           
            richTextBox1.Text = "学院：" + thou.Form1S[0] + "   ";
            richTextBox1.Text += "系："+thou.Form1S[1]+"\n";
            richTextBox1.Text += "年级：" + thou.Form1S[2] + "    ";
            richTextBox1.Text += "入学时间：" + thou.Form1S[3] + "\n";
            richTextBox1.Text += "辅导员：" + thou.Form1S[4] + "  ";
            richTextBox1.Text += "班主任：" + thou.Form1S[5] + "\n";
            richTextBox1.Text += "\n\n\n";
            richTextBox1.Text += "班训：" + thou.Form3S[1] + "\n";
            richTextBox1.Text += "班歌：" + thou.Form3S[0] + "\n";
            richTextBox1.Text += "自习时间：" + thou.Form4S[0] + "\n";
            richTextBox1.Text += "自习教室：" + thou.Form4S[1] + "\n";
            richTextBox1.Text += "考勤员：" + "\n";
            //for (int i = 0; i < name.Count; i++)
            //{
            //    richTextBox1.Text += name[i]+"  ";
            //}
            
            listView1.View = View.Details;
            listView1.FullRowSelect = true;
            listView1.GridLines = true;
            listView1.Columns.Add("姓名", 120);
            listView1.Columns.Add("学号", 120);
            listView1.Columns.Add("年龄", 120);
            listView1.Columns.Add("性别", 120);
            listView1.Columns.Add("籍贯", 120);
            listView1.Columns.Add("考勤员", 30);
            for (int i = 0; i < thou.listView.Items.Count; i++)
            {   
                
                this.listView1.Items.Add(thou.listView.Items[i].Text);
                this.listView1.Items[i].SubItems.Add(thou.listView.Items[i].SubItems[1].Text);
                this.listView1.Items[i].SubItems.Add(thou.listView.Items[i].SubItems[2].Text);
                this.listView1.Items[i].SubItems.Add(thou.listView.Items[i].SubItems[3].Text);
                this.listView1.Items[i].SubItems.Add(thou.listView.Items[i].SubItems[4].Text);
                this.listView1.Items[i].SubItems.Add(thou.listView.Items[i].SubItems[5].Text);
                if (thou.listView.Items[i].SubItems[5].Text=="1")
                {
                    richTextBox1.Text += thou.listView.Items[i].SubItems[0].Text+"   ";
                }
            }

            this.pictureBox2.Image = thou.pictureBox.Image;
        }
    }
}
